﻿
<template>
    <div class="tab-filter-type " style=" display: inline-block;">
        <div class="col-xs-3 padding20" style="padding-bottom:10px">
            <div class="input-group" style="margin-bottom:10PX;">
                <div class="input-group-btn">
                    <button type="button" style="height: 34px;min-width:80PX" class="btn btn-primary  dropdown-toggle">学期</button>
                </div>
                <base-xq :pzoption="query.xq" isnow></base-xq>
            </div>
        </div>
        <div class="col-xs-3 padding20" style="padding-bottom:10px">
            <div class="input-group" style="margin-bottom:10PX;">
                <div class="input-group-btn">
                    <button type="button" style="height: 34px;min-width:80PX" class="btn btn-primary  dropdown-toggle">指标类型</button>
                </div>
                <el-select placeholder="请选择"  size="mini" v-model="query.zb" class="form-control filter" style="height: 34px;padding:0px" collapse-tags>
                    <el-option v-for="item in zblxdata"
                               :key="item.lx"
                               :label="item.lx"
                               :value="item.lx">
                    </el-option>
                </el-select>
            </div>
        </div>
    
    </div>

</template>


<script>
    //评教课程指标管理
    //输出得查询格式必须为{ colid: obj.cxzd, cal: obj.cal, val: va.itemtext }，colid为字段,cal为查询类型(0:等于,1:包含-逗号隔开).val为值
    module.exports = {
        props: ['pzoption'],
        components: {
            'base-xq': httpVueLoader('/ViewV5/AppPage/QJJW/component/conxq.vue'),
        },
        data() {
            return {
                query: {
                    xq: { value: "" },
                    zb: "学生评教",
                },
                zblxdata: [{ lx: "学生评教" }, { lx: "同行评教" }, { lx: "督导评教" }]
            };
        },
        methods: {
            getqval: function (lb) {
                var chi = this;
                chi.pzoption.value = [];
                chi.pzoption.value.push({ colid: "dxdm", cal: "0", val: chi.query.zb });
                chi.pzoption.value.push({ colid: "xq", cal: "0", val: chi.query.xq.value });
            },
        },
        watch: {
            'query': { //深度监听，可监听到对象、数组的变化
                handler(newV, oldV) {
                    var chi = this;
                    if (newV) {
                        chi.getqval();
                        if (chi.query.xq.value && chi.query.zb) {
                            chi.$parent.Query();
                        }
                    }
                },
                deep: true
            }
        },
        mounted: function () {
            var chi = this;
            chi.$nextTick(function () {
             
            })

        }
    };
</script>